var e = require("../../@babel/runtime/helpers/interopRequireDefault").default, t = e(require("../../kta/index")), a = require("../../config/Links"), i = require("../../utils/YQYL"), s = e(require("../../api/auth.js"));

t.default.Page({
    data: {
        options: {},
        time: "",
        activity_info: {},
        succeedUser: [],
        shareUrl: "",
        poster: null,
        showPoster: !1,
        imgBaseUrl: a.imageBaseUrl.YQYL_new,
        postUtil: {
            handleSharePoster: function() {}
        },
        isLogin: !0
    },
    onShareAppMessage: function() {
        return (0, i.handleShare)(this, "18");
    },
    onLoad: function(e) {
        var t = this;
        (0, i.initPage)(this, e, "18").then(function(a) {
            t.setData({
                succeedUser: a.successUserMsg,
                options: e
            });
        });
    },
    onChange: function(e) {
        this.setData({
            timeData: e.detail
        });
    },
    bindgetphonenumber: function(e) {
        var t = this;
        e.detail.iv && e.detail.encryptedData && s.default.auth({
            source: 2,
            encryptedData: e.detail.encryptedData,
            iv: e.detail.iv
        }).then(function() {
            (0, i.initPage)(t, t.data.options, "18").then(function(e) {
                t.setData({
                    succeedUser: e.successUserMsg
                });
            });
        }).catch(function() {
            wx.showToast({
                title: "切换手机号码失败，请重试",
                icon: "none"
            });
        });
    },
    handlePoster: function() {
        this.data.poster ? this.setData({
            showPoster: !0
        }) : this.data.postUtil.handleSharePoster();
    },
    toRecordPage: function() {
        (0, i.toRecord18Page)();
    },
    toRulePage: function() {
        (0, i.toRule18Page)();
    },
    closePoster: function() {
        this.setData({
            showPoster: !1
        });
    }
});